<?php
class ReportController extends Controller{
	public function filters()
	{
		return array(
			'accessControl', // perform access control for CRUD operations
		);
	}
	
	public function accessRules()
	{
		return array(
			array('allow', 
				'actions'=>array('index','customer','loan'),
				'roles'=>GlobalConfiguration::isManageMode()?array('manager'):array(),
			),
			array('deny',  // deny all users
				'users'=>array('*'),
			),
		);
	}
	public function actionIndex()
	{
		$this->render('index',array('report'=>'general'));
	}
	
	public function actionCustomer()
	{
		$this->render('index',array('report'=>'customer'));
	}

	public function actionLoan()
	{
		$this->render('index',array('report'=>'loan'));
	}
}